<template>
  <div class="container">
    <div class="left">
      <div class="left-item active">推荐</div>
      <div class="left-item">最热</div>
      <div class="left-item">热藏</div>
      <div class="left-item">飙升</div>
    </div>
    <div class="right">
      <div class="right-item" v-for="item in playList" :key="item.id">
        <div class="right-item-left">
          <img class="item-img" :src="item.picUrl" alt="" />
        </div>
        <div class="content">
          <div class="content-header">
            <div class="title">{{ item.name }}</div>
            <div class="author">制作人：曼谷</div>
          </div>
          <div class="text">
            清晨的泥土芳香扑鼻而来，深呼大自然的气息，安静的欣赏花草树木换装后新装，尽情享受这美妙的春光。
          </div>
          <div class="content-footer">
            <el-button icon="el-icon-video-play" type="primary" size="mini"
              >播放全部</el-button
            >
            <el-button icon="el-icon-share" type="primary" size="mini"
              >分享</el-button
            >
          </div>
        </div>
      </div>
      <div class="download">
        <span class="download-text">查看更多内容，请下载客户端</span>
        <el-button type="primary">立即下载</el-button>
      </div>
    </div>
  </div>
</template>

<script>
import { gfRequest } from "../../utils/gfRequest";

export default {
  name: "PlayList",
  data() {
    return {
      playList: [],
    };
  },
  async mounted() {
    const { data } = await gfRequest("/personalized?limit=30");
    this.playList = data.result;
  },
};
</script>

<style scoped>
.container {
  display: flex;
  width: 1000px;
  margin: 0 auto;
  padding-top: 20px;
  color: #555;
}
/* 左侧样式 */
.left {
  width: 210px;
  padding-top: 10px;
}
.left-item {
  width: 100%;
  height: 36px;
  line-height: 36px;
  text-align: center;
  font-size: 14px;
  margin-bottom: 18px;
}
.left-item.active,
.left-item:hover {
  color: #fff;
  background-color: #169af3;
}

/* 右侧样式 */
.right {
  width: 770px;
  padding-left: 20px;
}
.right-item {
  display: flex;
  margin-top: 16px;
  border-bottom: 1px solid #dcdcdc;
}
.right-item-left {
  width: 108px;
  height: 119px;
  padding: 4px 0 0 4px;
  margin-right: 5px;
  background: url("../../assets/images/other.png") no-repeat -119px -407px;
}
.item-img {
  width: 100px;
  height: 100px;
  cursor: pointer;
}
.content {
  width: 650px;
}
.content-header {
  display: flex;
  justify-content: space-between;
  color: #333;
  padding-bottom: 7px;
}
.title {
  font-size: 14px;
}
.author {
  font-size: 13px;
}
.text {
  color: #999;
  margin: 5px 13px 6px 0;
  color: #999;
  font-size: 13px;
  height: 40px;
}
.download {
  width: 100%;
  height: 120px;
  line-height: 120px;
  text-align: center;
}
.download-text {
  padding-right: 30px;
}
</style>